import { createRouter, createWebHashHistory } from "vue-router";
import Home from "@/components/home/Home.vue";
import Kind from "@/components/kind/Kind.vue";
import Message from "@/components/message/Message.vue";
import About from "@/components/about/About.vue";
import Article from "@/components/home/Article.vue";
import Manager from "@/components/manager/ManagerHome.vue";
import ArticleList from "@/components/manager/ArticleList.vue";
import WriteBlog from "@/components/manager/WriteBlog.vue";
import DashBoard from "@/components/manager/DashBoard.vue";
const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: "/",
      redirect: "/Home",
    },
    {
      path: "/Home",
      component: Home,
    },
    {
      path: "/Kind",
      component: Kind,
    },
    {
      path: "/Message",
      component: Message,
    },
    {
      path: "/About",
      component: About,
    },
    {
      path: "/ShowArticle/:id",
      component: Article,
    },
    {
      path: "/Manager",
      component: Manager,
      children: [
        { path: "", component: DashBoard },
        { path: "WriteBlog", component: WriteBlog },
        { path: "Article/List", component: ArticleList },
      ],
    },
  ],
});

export default router;
